Repository navigation
Fix CLI config handling: --config on convert/generate, and missing config files - #46
Merged
niklashoelter merged 1 commit intoOct 18, 2026
Conversation
- convert and generate rejected --config, although docs/cli.md shows it. Both now accept it. - A --config path that does not exist is now a usage error instead of a silent fallback to the built-in defaults (UMA, which needs a token). With no --config and no ./config.json, the run continues on defaults and logs a warning naming the model. config --validate on a missing file exits 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
gpuma convertandgpuma generatereject--configwithunrecognized arguments, althoughdocs/cli.mdshows--configon both. They can only read./config.jsonfrom the working directory.--configpath that does not exist is silently ignored.load_config_from_filefalls back to the built-in defaults, so a typo in the path runs the default model (UMAuma-s-1p2). That run then fails on a missing Hugging Face token, or, if a token is set, runs a different model than the one in the intended config.gpuma config --validate missing.jsonreports the file as valid.Changes
convertandgenerateaccept--config/-c, like the other commands.--configpath that does not exist is a usage error (argparse, exit code 2).--configand no./config.json, the CLI still runs on the defaults, but now logs a warning that names the default model.config --validateon a missing file logs an error and exits 1.docs/cli.mddescribes the missing-config behaviour and notes that global flags (--device,--model-type,--verbose,--quiet) go before the subcommand.The check lives in the CLI (
_resolve_config_path).load_config_from_filein the Python API still returns defaults for a missing file.Behaviour change
A script that passes
--configwith a path that does not exist used to run on the defaults. It now stops with exit code 2. This affects only invocations whose config path is wrong.Tests
New tests in
tests/test_cli.py:test_convert_and_generate_accept_config(both commands)test_missing_explicit_config_is_a_usage_errortest_validate_rejects_a_missing_filetest_no_config_anywhere_reports_defaultsNone of them need a GPU.
tests/test_cli.pypasses (28 passed, 1 skipped forHF_TOKEN), including the end-to-end ORB runs on GPU. The full suite passed on an earlier revision of this branch (316 passed, 14 skipped). The final revision only drops a separate charge/multiplicity change fromcli.pyand its tests.